package easy.trace;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Span implements Serializable {
    private Long traceId;
    private Long id;
    private Long parentId;
    private String spanName;
    private String serviceId;
    private List<Annotation> annotations = new ArrayList();
    private List<BinaryAnnotation> binaryAnnotations = new ArrayList();
    private String eventData;
    private boolean isSample;
    private boolean isForChuandi;

    public boolean isForChuandi() {
        return this.isForChuandi;
    }

    public void setForChuandi(boolean isForChuandi) {
        this.isForChuandi = isForChuandi;
    }

    public boolean isSample() {
        return this.isSample;
    }

    public void setSample(boolean sample) {
        this.isSample = sample;
    }

    public Span() {
    }

    public void addAnnotation(Annotation a) {
        this.annotations.add(a);
    }

    public void addBinaryAnnotation(BinaryAnnotation a) {
        this.binaryAnnotations.add(a);
    }

    public String getEventData() {
        return this.eventData;
    }

    public void setEventData(String eventData) {
        this.eventData = eventData;
    }

    public Long getTraceId() {
        return this.traceId;
    }

    public void setTraceId(Long traceId) {
        this.traceId = traceId;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return this.parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getSpanName() {
        return this.spanName;
    }

    public void setSpanName(String spanName) {
        this.spanName = spanName;
    }

    public List<Annotation> getAnnotations() {
        return this.annotations;
    }

    public void setAnnotations(List<Annotation> annotations) {
        this.annotations = annotations;
    }

    public List<BinaryAnnotation> getBinaryAnnotations() {
        return this.binaryAnnotations;
    }

    public void setBinaryAnnotations(List<BinaryAnnotation> binaryAnnotations) {
        this.binaryAnnotations = binaryAnnotations;
    }

    public String toString() {
        return "Span{traceId=" + this.traceId + ", id=" + this.id + ", parentId=" + this.parentId + ", serviceId=" + this.serviceId + ", spanName='" + this.spanName + '\'' + ", annotations=" + this.annotations + ", binaryAnnotations=" + this.binaryAnnotations + ", isSample=" + this.isSample + ", isForChuandi=" + this.isForChuandi + '}';
    }

    public String getServiceId() {
        return this.serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }
}

